0
Welcome Guest! Login
0 items Join Now

Tutorial - How to Add Custom CSS File

  • Re: Tutorial - How to Add Custom CSS File

    Posted 13 years 8 months ago
    • thats great, but the css file is not loaded last so it's not overwritting all styles!
      how to achieve that?
      thanks
  • Re: Tutorial - How to Add Custom CSS File

    Posted 13 years 8 months ago
  • Re: Tutorial - How to Add Custom CSS File

    Posted 13 years 8 months ago
    • I know all that. But I would like to have inheritence not specificity. specificity is PITA. :cheesy:
  • Re: Tutorial - How to Add Custom CSS File

    Posted 13 years 8 months ago
    • for example I want to change the default style

      .font-family-helvetica {font-family: Helvetica, Arial, FreeSans, sans-serif;}

      to

      .font-family-helvetica {font-family: Arial, Helvetica, FreeSans, sans-serif;}

      which is applied on body id="rt-variation". It doesn't inherit it nor overweight it.

      If I change my custom style to
      #rt-variation .font-family-helvetica {font-family: Arial, Helvetica, FreeSans, sans-serif;}

      it still DOESN'T overweight it.
      Even
      body #rt-variation .font-family-helvetica
      still DOESN'T overweight it.

      SO I would like inheritence. Simple and structured.
  • Re: Tutorial - How to Add Custom CSS File

    Posted 13 years 8 months ago
    • Hello Martin,

      I have tested it and the custom css file is loaded. Firstly, ensure you've actually made the changes to the file. Check the file again, in case permissions are causing some issues.

      Secondly, ensure you are clearing your browser cache, and Joomla cache (Admin > Site > Clean Cache), as some changes will not even show up until you clear your cache.

      Third, your code is wrong. The html code is:
       
      <body id="rt-variation"  class="font-family-helvetica font-size-is-default menu-type-fusionmenu col12 ">
       
      You can see that the body both using id and class. So to override it, the css should be:
       
      #rt-variation.font-family-helvetica {font-family: tahoma;}
       
      Notice that there is no "space" between "#rt-variation" and ".font-family-helvetica".
      Just change the tahoma with your font you like.
    • The following users have thanked you: PaddyThorne

  • Re: Tutorial - How to Add Custom CSS File

    Posted 13 years 8 months ago
    • thanks for the hint. Yes it is loaded, but somewhere between other css files.
      I would like it to be loaded absolutely last after fusionmenu.css of crystalline template.
      How to achieve that? There must be some sort of function that sets the order of the css files that are loaded!
      Thanks you
  • Re: Tutorial - How to Add Custom CSS File

    Posted 13 years 8 months ago
    • setting
      isOrderable() to true in your mycustomstyle.php
      doesn't help.
  • Re: Tutorial - How to Add Custom CSS File

    Posted 13 years 8 months ago
    • I think the order is based on alphabetical ordering. I don't have idea about it now, but may I know why you need to order them?
  • Re: Tutorial - How to Add Custom CSS File

    Posted 13 years 8 months ago
    • unfortunately it's not alphabetical.
      I want to order them to have my custom css at latest position so it overwrites the default ones. I don't want to use specificity in this case.
  • Re: Tutorial - How to Add Custom CSS File

    Posted 13 years 8 months ago
    • if gantry can't do this I will add it manually into the index.php.

      I think it should be in future versions of gantry framework to be able to set the order of elements gantry puts in dynamically (JS,CSS,...).

Time to create page: 0.082 seconds